From: Jo-Philipp Wich Date: Mon, 21 Aug 2023 07:24:32 +0000 (+0200) Subject: luci-base: dispatcher.uc: satisfy auto-created intermediate nodes X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=4e4e504f3ddacfb5ab42cf602485f7e22997498e;p=project%2Fluci.git luci-base: dispatcher.uc: satisfy auto-created intermediate nodes When we auto-create intermediate parent nodes, make sure that those nodes are marked as satisfied, so that it is possible to dispatch their actual child nodes. This aligns the behavior with the old Lua based dispatcher implementation. Fixes: #6529 Signed-off-by: Jo-Philipp Wich (cherry picked from commit ec8cf9e83cd4e4afdf0a00910e057a890600e8a8) --- diff --git a/modules/luci-base/ucode/dispatcher.uc b/modules/luci-base/ucode/dispatcher.uc index 7ff34afba9..f42155d539 100644 --- a/modules/luci-base/ucode/dispatcher.uc +++ b/modules/luci-base/ucode/dispatcher.uc @@ -395,7 +395,7 @@ function build_pagetree() { } node.children ??= {}; - node.children[s[0]] ??= {}; + node.children[s[0]] ??= { satisfied: true }; node = node.children[s[0]]; }